package com.elong.redis;

import com.elong.common.cache.redis.JedisUtil;
import com.elong.constant.TimeUnitConstant;

public class JedisTest{
    
    public static void main(String[] args) throws Exception {
	JedisUtil.addStringToJedis("test", "aaa", TimeUnitConstant.ONE_MINUTES_SECOND * 100);
	String result = (String) JedisUtil.getStringFromJedis("test");
	Thread.sleep(60 * 1000);
	JedisUtil.addStringToJedis("test", "eee", TimeUnitConstant.ONE_MINUTES_SECOND * 100);
	JedisUtil.addStringToJedis("test", "eee", TimeUnitConstant.ONE_MINUTES_SECOND * 100);

	JedisUtil.addStringToJedis("test", "eee", TimeUnitConstant.ONE_MINUTES_SECOND * 100);

	JedisUtil.addStringToJedis("test", "fff", TimeUnitConstant.ONE_MINUTES_SECOND * 100);

	String result1 = (String) JedisUtil.getStringFromJedis("test");

	System.out.println(result);
    }

}
